-
Posts
1,033 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
roman numerals to decimal conversion question
gw1500se replied to jodunno's topic in PHP Coding Help
Why the restriction of subtraction only up to V? How would you process MCM? -
You are probably not getting any reply because you did not post your code here. Few people will go to a 3rd party web site to see your code and ever fewer will download zipped code. Post you code here using the code icon (<>) on the to menu and specify PHP. You will be more likely to get a response.
-
Don't post images. Post your actual code using the code icon (<>) on the top menu then select PHP. Also enable error reporting and post any errors. error_reporting(E_ALL);
-
roman numerals to decimal conversion question
gw1500se replied to jodunno's topic in PHP Coding Help
Not sure if this will work for you but I found this regex for validating Roman numerals: ^M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$ -
roman numerals to decimal conversion question
gw1500se replied to jodunno's topic in PHP Coding Help
I'm not sure but the only way I think that can be accomplished is with the Zend Frame work and 'zend_measure_number'. -
roman numerals to decimal conversion question
gw1500se replied to jodunno's topic in PHP Coding Help
Sorry. I misread your OP and got it backwards. How about this? -
roman numerals to decimal conversion question
gw1500se replied to jodunno's topic in PHP Coding Help
Search engines are your friend. https://www.hashbangcode.com/article/php-function-turn-integer-roman-numerals -
if(!isset($_SESSION['user']) || $_SESSION['user'] !== 'SiteOwner') { exit; }
-
<a href="\"index.php?id=".<?php echo $data['id']; ?>."\">"
-
Nope. A<B is true if A is less than B and A>B is true if A is greater than B.
-
It would be helpful if you post the HTML form. I suspect by fixing your form the looping can be made easier.
-
Comparing whether files are identical
gw1500se replied to NotionCommotion's topic in PHP Coding Help
It is possible to have an MD5 collision however it is remote. Something like 1:2^64/2. It is not possible to have the same SHA-1 sum too. If you get a matching MD5 hash then calculate the SHA-1 sum to see if they are the same as well. Then you would be safe rejecting the file if it is that critical. -
The first 'isset' in the if is unnecessary. That will always be set to something. Did you 'echo' the other parameters to be sure they contain what you expect? Do you have errors turned on? error_reporting(E_ALL);
-
The path is relative to your document root and cannot go outside. If your absolute path is outside of document root then you need to check permissions. That path must give read permission to whatever user is running httpd. Which is likely different than the user doing the development which may have r/w permissions.
-
Poor programing practice. The funtion should be: function clean_names($dirty_name) { $clean_name = strip_tags($dirty_name); $clean_name = str_replace(' ', '', $clean_name); $clean_name = ucfirst(strtolower($clean_name)); return $clean_name; }
-
How do yo know it is not going through that function, since it returns nothing?
-
Search engines are your friend. Create drop down from MySQL
-
Step 1 is to learn PHP. Step 2 is to perhaps read this or similar. Step 3 is to program your idea of what should work based on the previous. Step 4 is to present your code here that is giving you trouble and then we can help.
-
php shell() function not executing Python script
gw1500se replied to Yanover's topic in PHP Coding Help
Do you have errors turned on in PHP? error_reporting(E_ALL); What error do you get? You need to check what 'exec' is returning? Out of curiosity, why are you using Python rather than executing the API directly? -
I don't see where you are including any soap action in your curl headers. In any case I suggest you use PHP's soap extension. It handles all the intricacies for you.
-
Send Soap by PHP composer fail load class
gw1500se replied to nitiphone2021's topic in PHP Coding Help
You need to install SoapClient separately. It is not normally installed by default. You don't specify what OS you are using but in Linux you need to do either: sudo apt-get install php-soap or sudo yum install php-soap depending on your flavor of *NIX. -
Damn! I missed the obvious.
-
First please use the code icon (<>) in the menu and specific PHP for your code. Second, when you have an error, post it too so we know what the exact error is. Third, which is line 11 being referred to in the error? Finally what are you trying to accomplish with this line: $file = rand(1000,100000)."-".$_FILES['file']['name'];
-
Also please use the code icon (<>) in the menu and select PHP.