![]() |
|
[PHP] php help of a non-convertible class. - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183) +---- Thread: [PHP] php help of a non-convertible class. (/showthread.php?tid=5299347) Pages: Pages
1
2
|
php help of a non-convertible class. - clemme - Jun 9, 2016 I have a php access code that communicates with the db of course , and sends the user id logged returning based user id its nickname , the problem is that I should do a file within its folder nick ( the folder is done automatically during recording and I did it with mkdir and never gave me problems ) . But now with fopen I try to write in the folder based on always their user name and a randomly generated number . But now nell'fopen unlike mkdir folder with the same variable ( indicating the name of the folder that corresponds to the nickname ) , he says that the object of the class can not be converted to the string ... Why? how do I fix ? * - Sakuto - Jun 9, 2016 This is really incomprehensible, could you please avoid useless sentence and try to be clear? Also, provide us your code and the exact error message. * - Sakuto - Jun 9, 2016 (Jun 9, 2016 12:51 PM)Yani Wrote: Why? How do I fix? You got a clover award just for repeating the exact same thing as me????? * - Sheeple - Jun 9, 2016 (Jun 9, 2016 12:54 PM)Sakuto Wrote: You got a clover award just for repeating the exact same thing as me????? Maybe if I do it I will get one too :) * - clemme - Jun 10, 2016 Never mind the form of registration and of autentication with the various functions for communicate with the db. I have this class call iscritions that the login returns the nick; class + function this is: file.functions.php: Code @include_once 'connect-database.php';Code <?phphow to solve ? * - Sakuto - Jun 10, 2016 You probably mean to do: PHP Code * - clemme - Jun 10, 2016 (Jun 10, 2016 04:10 AM)Sakuto Wrote: You probably mean to do:thus it remains vulnerable to XSS correct? another way ? * - Sakuto - Jun 10, 2016 XSS in a text file...? No, this is not possible :D You will never display the text you get so I don't even see the point of the htmlentities * - clemme - Jun 10, 2016 (Jun 10, 2016 05:00 AM)Sakuto Wrote: XSS in a text file...? No, this is not possible :D You will never display the text you get so I don't even see the point of the htmlentitiesok ok thnk perfect.. Boys with tips that you gave me , now does not give me more errors , but the file is not actually created .... (Jun 10, 2016 05:00 AM)Sakuto Wrote: XSS in a text file...? No, this is not possible :D You will never display the text you get so I don't even see the point of the htmlentities Boys with tips that you gave me , now does not give me more errors , but the file is not actually created .... * - frapppp - Jun 10, 2016 Code $fetch = "$obj/$rand_number"; //errore di conversione che voglio risolvere$obj can't be appended to a string since it's holding your class object. What are you hoping $fetch will look like after that code? It should be still giving you errors. If you can post your updated code with a clear explanation of what you're trying to do and what's wrong, it'd make it easier. * - clemme - Jun 10, 2016 But as I said , the directory is created at the time of account registration , and already exists . what's the problem? * - frapppp - Jun 10, 2016 (Jun 10, 2016 12:34 PM)clemme Wrote: But as I said , the directory is created at the time of account registration , and already exists . what's the problem? In that case it's likely permissions. Chmod your folders to allow for writing from user/group. * - Sakuto - Jun 10, 2016 Do you have any error or it's just not working? And are you sure you did not fully removed the return part? * - clemme - Jun 11, 2016 the creation of the folder right after I give the read and write permissions with chmod 777 but nothing * - frapppp - Jun 11, 2016 (Jun 11, 2016 12:40 AM)clemme Wrote: the creation of the folder right after I give the read and write permissions with chmod 777 So the folder is created but the file isn't? Please post all your code and refer back to my previous post. |